import Vue from 'vue'
import router from './router'
import Api from './api'
import App from './App.vue'
import moment from 'moment'
import axios from 'axios'
import i18n from './i18n/index'
import store from "./store/index"
import { errorr } from "./api/error.js"
import { dateFormat, Format} from "./api/data.js"
router.beforeEach((to, from, next) => {
  /* 路由发生变化修改页面title */
  if (to.meta.title) {
    document.title = to.meta.title
  }
  next()
})
Vue.use(Api)

Vue.config.productionTip = false

Vue.prototype.$moment = moment


import 'vant/lib/index.css';
 

import { post, get, patch, put, gett} from './api/http'
//定义全局变量
Vue.prototype.$post=post;
Vue.prototype.$get = get;
Vue.prototype.$gett = gett;
Vue.prototype.$patch=patch;
Vue.prototype.$put=put;
Vue.prototype.$error = errorr
Vue.prototype.$dateFormat = dateFormat
Vue.prototype.$Format = Format


import { Button } from 'vant';
import { NavBar,Icon,Field } from 'vant';
import { IndexBar, IndexAnchor } from 'vant';
import { Cell, CellGroup } from 'vant';
import { Tabbar, TabbarItem } from 'vant';
import { Notify } from 'vant';
import { Toast } from 'vant';
import { Popup } from 'vant';
import { Overlay } from 'vant';
import { Row, Col } from 'vant';
import { Uploader } from 'vant';
import { Tab, Tabs } from 'vant';
import { Panel } from 'vant';
import { Tag } from 'vant';
import { PasswordInput, NumberKeyboard } from 'vant';
import { Checkbox, CheckboxGroup } from 'vant';
import { Divider } from 'vant';
import { Stepper } from 'vant';
import { List } from 'vant';
import { PullRefresh } from 'vant';

Vue.use(PullRefresh);
Vue.use(Stepper);
Vue.use(Divider);
Vue.use(Checkbox).use(CheckboxGroup);

Vue.use(PasswordInput).use(NumberKeyboard);
Vue.use(Tag);
Vue.use(List);
Vue.use(Panel);
Vue.use(Tab).use(Tabs);
Vue.use(Toast);
Vue.use(Uploader);
Vue.use(Row).use(Col);
Vue.use(Overlay);
Vue.use(Popup);
Vue.use(Notify);
Vue.use(Tabbar).use(TabbarItem);
Vue.use(Cell).use(CellGroup);
Vue.use(NavBar);
Vue.use(Button)
Vue.use(Icon);
Vue.use(Field);
Vue.use(IndexBar).use(IndexAnchor);

import "./api/public.js"
import "./css/reset.css"

new Vue({
  router,
  i18n : i18n,
  store,
  render: h => h(App)
}).$mount('#app')
